﻿using Hetang.Models.Config;
using Hetang.Models.DataContext;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Hetang.Models.Interface
{
    public interface ISessionRepository
    {
        /// <summary>
        /// 设置登录Session
        /// </summary>
        /// <param name="account">提供uid,username,usertype</param>
        /// <param name="isLogin">是否登录操作</param>
        void SetLoginSession(tbl_Account account,bool isLogin);

        /// <summary>
        /// 清理Session
        /// </summary>
        void ClearSession();

        /// <summary>
        /// 获取登录用户的用户类型
        /// </summary>
        UserType GetUserType();

        /// <summary>
        /// 获取登录用户的用户ID
        /// </summary>
        /// <returns></returns>
        int GetUserId();

        /// <summary>
        /// 获取登录用户的邮箱地址
        /// </summary>
        /// <returns></returns>
        string GetEmail();

        /// <summary>
        /// 获取登录用户的用户名
        /// </summary>
        /// <returns></returns>
        string GetUserName();

        /// <summary>
        /// 获取简历ID
        /// </summary>
        /// <returns></returns>
        int GetResumeId();

        /// <summary>
        /// 获取公司ID
        /// </summary>
        /// <returns></returns>
        int GetCompanyId();

        /// <summary>
        /// 设置公司ID
        /// </summary>
        void SetCompanyId(int id);

        /// <summary>
        /// 设置简历ID
        /// </summary>
        void SetResumeId(int id);
    }
}